import request from '@/utils/request'

// 查询房子租售列表
export function listHouse(query) {
  return request({
    url: '/mini/house/list',
    method: 'get',
    params: query
  })
}

// 查询房子租售详细
export function getHouse(id) {
  return request({
    url: '/mini/house/' + id,
    method: 'get'
  })
}

// 新增房子租售
export function addHouse(data) {
  return request({
    url: '/mini/house',
    method: 'post',
    data: data
  })
}

// 修改房子租售
export function updateHouse(data) {
  return request({
    url: '/mini/house',
    method: 'put',
    data: data
  })
}

// 删除房子租售
export function delHouse(id) {
  return request({
    url: '/mini/house/' + id,
    method: 'delete'
  })
}

// 上传图片
export function importFile(data) {
  return request({
    url: '/mini/house/uploadPic',
    method: 'post',
    data: data
  })
}
// 获取图片
export function getHousePicUrl(data) {
  return request({
    url: '/mini/house/getHousePic',
    method: 'post',
    data: data
  })
}


// 微信登录
export function wxLogin(data)
{
  return request({
    url: '/wx/user/login',
    method: 'post',
    data: data
  })
}

